package com.itheima.mybatis.mapper;

import com.itheima.mybatis.domain.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author 24040
 * @name UserMapper
 * @date 2022-08-05 10:44
 */
public interface UserMapper {


    int deleteUser();

    int updateUser();

    User getUserById();

    List<User> getUserList();

    User getUserByUsername(String username);

    User checkLogin(String username,String password);

    /**
     * map集合类型的参数
     * @param map
     * @return
     */
    User checkLoginByMap(Map<String,Object> map);


    /**
     * 按照用户进行插入
     * @param user
     * @return
     */
    int insertUser(User user);

    /**
     * @Param标识参数
     * @param username
     * @param password
     * @return
     */
    User CheckLoginByParam(@Param("username") String username, @Param("password") String password);
}
